loading 60 images locally fast is it possible...? [closed]
Posted
by
Tariq- iPHONE Programmer
on Programmers
See other posts from Programmers
or by Tariq- iPHONE Programmer
Published on 2011-01-08T12:06:50Z
Indexed on
2011/01/08
12:59 UTC
Read the original article
Hit count: 310
iphone
when my app starts it loads 60 images at a time in UIImageView and it also loads a background music.
in simulator it works fine but in IPAD it crashes..
-(void)viewDidLoad
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//img.animationImages = [[NSArray arrayWithObjects:
MyImages = [NSArray arrayWithObjects:
//[UIImage imageNamed: @"BookOpeningB001.jpg"],...... B099,nil];
//[NSTimer scheduledTimerWithTimeInterval: 8.0 target:self selector:@selector(onTimer) userInfo:nil repeats:NO];
img.animationImages = MyImages;
img.animationDuration = 8.0; // seconds
img.animationRepeatCount = 1; // 0 = loops forever
[img startAnimating];
[self.view addSubview:img];
[img release];
[pool release];
//[img performSelector:@selector(displayImage:) ];
//[self performSelector:@selector(displayImage:) withObject:nil afterDelay:10.0];
[self performSelector: @selector(displayImage) withObject: nil afterDelay: 8.0];
}
-(void)displayImage {
SelectOption *NextView = [[SelectOption alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:NextView animated:NO];
[NextView release];
}
Am i doing anything wrong ? Is there any other alternative to load the local images faster in UIImageView !
© Programmers or respective owner